<template>
  <div>
    <ygsearch></ygsearch>

    <u-swiper :height="340" :list="list"></u-swiper>
  </div>
</template>

<script>
export default {
  data() {
    return {
      list: [],
    };
  },
  async onLoad() {
    const [err, res] = await uni.request({
      url: "https://api-hmugo-web.itheima.net/api/public/v1/home/swiperdata",
    });

    this.list = res.data.message.map((v) => ({ ...v, image: v.image_src }));
  },
};
</script>

<style>
</style>